﻿
using System;
using System.Collections.Generic;
using System.IO;

public class Zapros:HaveToByte
{
    public string slovo;
    public bool used;

    public Zapros(string _slovo, bool _u)
    {
        this.slovo = _slovo;
        this.used = _u;
    }

    public Zapros(BinaryReader br)
    {
        this.slovo = BYTE.ToShortString(br);
        this.used = BYTE.ToStruct<bool>(br);
    }

    List<byte> b;
   
    public byte[] ToByte()
    {
        b = new List<byte>();
        b.AddRange(ToBYTE.ShortString(slovo));
        b.AddRange(ToBYTE.Struct(used));
        return b.ToArray();
    }

    public override string ToString()
    {
        return slovo;
    }
}
